<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/WEB-INF/taglib.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>系统用户操作信息</title>
<%@ include file="/WEB-INF/jsp/include.jsp"%>
<script type="text/javascript">
		var path = "${path}";
		var params=new Object();
		var arr = [{
				title: "人员角色组织机构",
				url:"/system/xtRy/toRyjsjg"
			},{
				title: "登录日志",
				url:"/system/xtRy/toOperateTime"
		}];
		$(function(){
			setAjaxLoading();
			if (arr != null && arr.length > 0) {
				for (var i=0; i<arr.length; i++) {
					var item = arr[i];
					var item_id = item.id;
					var item_title = item.title;
					var item_url = item.url;
					var url = "";
					$("#tab").tabs("add", {
						"id": item_id,
						"title": item_title,
						"content": url,
						"closable": false,
						"selected": false
					});
				}
				
				$("#tab").tabs("select", 0);
			}
		});
		
		function tab_onSelect(title, index) {
			var item = arr[index];
			
			var loaded = false;
			if (typeof (item.loaded) != "undefined" && item.loaded != null) {
				loaded = true;
			}
			
			if (!loaded) {
				var url = createFrame(item.id, String.format("{0}{1}", path, item.url));
				
				var tab = $('#tab').tabs('getSelected');
				$("#tab").tabs("update", {
					"tab": tab,
					options: {
						"content": url
					}
				});
				
				item.loaded = true;
			}
		}
		
		function createFrame(id, url) {
			var html = String.format('<iframe scrolling="auto" frameborder="0" src="{0}" style="width:100%;height:100%;"></iframe>', url);
			return html;
		}
		
		</script>
</head>

  <body  style="margin:0px; padding:0px;" > 
	<%@ include file="/WEB-INF/jsp/loading.jsp"%>
	<div class="easyui-layout" fit="true" >
		<div data-options="region:'center',title:'',split:false,border:false">
			<div id="tab" class="easyui-tabs" data-options="fit:true,onSelect:tab_onSelect" >
			</div>		
		</div>
	</div>	
</body>
</html>
